Prior art flushing devices, such as for example toilet flushers were manually operated. However, these flushers could not very well operate by incapacitated individuals such as for example hospitalized patients. Some other people failed to flush the toilet either out of negligence or because the manual touch of the activating lever was hygienically undesirable. For these reasons it was recognized that an automatic flushing device would be of advantage. With the advent of optical proximity switches wall hang urinals were developed utilizing the interruption of a light beam for optically controlling flushing. These earlier automated flushers did not become popular because they operated on approach and splashed the liquid around at the time a person was close to the urinal. A simple time delay between the approach i.e. the interruption of light beam and flushing could not solve the problem properly for the same reason. Because of these shortcomings these early propositions for automating flushers of toilets did not materialize. The apparatus according to the present invention is a substantial improvement over prior art devices since it eliminates the above-mentioned undesirable features and excludes the need of manual operation, it also provides an automatic logic control circuit between the sensor switch and the electromechanically operated liquid dispenser or flusher, thereby making said apparatus responsive to perform a desired switching cycle. It also provides for the use of a modulated radiation which in a retro-reflective mode of operation permits to develop a compact unit, comprising all elements of the apparatus such as sensor, control circuit, electrically operated liquid dispenser and power supply. Such a single unit can be easily mounted either on an already existing liquid dispenser or toilet flusher. Said apparatus can also be united with the dispenser in a single self contained unit. This invention also provides an improved electrically operated liquid dispenser or flusher. Such an apparatus may advantageously be employed for example in chemical processing and a programmed flushing or precise additions of chemicals are needed, in such a case manual control could not properly perform. Generally in a great number of industrial applications, automatically and electrically controlled liquid dispensers could greatly enhance and improve production. Besides using light operated sensors they could be responsive to chemical substances and/or other physical parameters such as temperature, infrared mechanical motion, ultrasonic, electromagnetic radiation, etc.